// pages/buy/buy.js
const { getBuy } = require("../api/index")
Page({

  data: {
    buyList:[]
  },
  onLoad(options) {
    getBuy({id:options.id}).then(res =>{
      if(!res.data.msg){
        this.setData({
          buyList:res.data.data[0]
        })
      }else{
        return
      }
      // console.log(res.data)
    })

  },
  onSubmit(){
    wx.showToast({
      title: '购买成功',
    })
  }

  
})